xen: sched: avoid spuriously re-enabling IRQs in csched2_switch_sched()
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 26 Apr 2016 16:56:56 +0000 (18:56 +0200)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 9 May 2016 14:41:25 +0000 (15:41 +0100)
commitfb0c3a8a30906005afc8c976b5c469d86496871e
tree2e80fa2f6d9eed7aa21df38cdac0f5406d7dcb49
parent4084fee7a3204bf8ccf7d993dea09186e4e7dd48
xen: sched: avoid spuriously re-enabling IRQs in csched2_switch_sched()

interrupts are already disabled when calling the hook
(from schedule_cpu_switch()), so we must use spin_lock()
and spin_unlock().

Add an ASSERT(), so we will notice if this code and its
caller get out of sync with respect to disabling interrupts
(and add one at the same exact occurrence of this pattern
in Credit1 too)

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/common/sched_credit.c
xen/common/sched_credit2.c